@layout("/common/_container.html",{js:["/assets/modular/system/project/project.js"],css:["/assets/common/css/beautiful.css"]}){
<link rel="stylesheet" href="${ctxPath}/assets/common/css/project.css?v=${constants.getReleaseVersion()}" media="all">
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/datatables/media/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/datatables/media/css/jquery.dataTables.min.css">
<style>

    .input .layui-select-title {
        display: none;
    }

    .gc {
        width: 60px;
    }

    .ss {
        width: auto;
    }

    .dm {
        width: 28px;
    }

    .layui-form-select {
        width: 86px;
    }

    /*不要删除*/
    .sTitle {
        width: calc(100% / 9);
        flex: 0 0 calc(100% / 9);
        align-items: center;
        line-height: 100%;
        display: inline-flex;
        transform: scale(.8) translateX(-2px);
    }

    .sTitle1 {
        padding-right: 40px;
    }

    .sTitle2 {
        padding-right: 40px;
    }

    .sTitle11 {
        margin-left: -24px;
        padding-right: 45px;
    }

    .sTitle3 {
        padding-right: 70px;
    }
    .layui-table-cell:first-child {
        height: auto;
        line-height: inherit;
    }
</style>
<style>
    .layui-table dl {
        width: 120px;
        width: calc(100% / 8);
        text-align: center;
        color: #64a84d;
        overflow: hidden;
    }

    .layui-table dt {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        border: 2px solid #e1e2e6;
        background-color: #FFF
        margin: 0 auto;
        z-index: 2;
        position: relative;
    }

    .layui-table dt::before {
        content: '';
        display: block;
        width: 80px;
        height: 2px;
        background: #e1e2e6;
        position: absolute;
        top: 10px;
        right: 0;
        margin-right: -80px;
    }

    .layui-table dl:last-child dt::before {
        display: none;
    }

    .layui-table dd {
        margin: 0;
    }

    .layui-table dl:last-child::before {
        display: none;
    }

    .layui-table .dt1::before {
        background: #16C784;
    }

    .layui-table .dt1 {
        background-color: #16C784;
        border-color: #16C784;
        color: #FFFFFF;
        line-height: 22px;
        font-size: 11px;
    }

    .layui-table .dt1ye::before {
        background: #f3cc0a;
    }

    .layui-table .dt1ye {
        background-color: #f3cc0a;
        border-color: #f3cc0a;
        color: #FFFFFF;
        line-height: 22px;
        font-size: 11px;
    }

    .layui-table .dt11::before {
        content: '';
        display: block;
        width: 98px;
        height: 2px;
        position: absolute;
        top: 13px;
        left: 72px;
    }

    .layui-table .dt11 {
        background-color: #cd1621;
        border-color: #EA3943;
        /*background-color: #3861FB;*/
        /*border-color: #3861FB;*/
        color: #FFFFFF;
        line-height: 22px;
        font-size: 11px;
    }

    .layui-table dt {
        line-height: 22px;
    }

    .layui-table .spanNumber {
        font-size: 18px;
    }
</style>
<style>
    /*弹性布局*/
    .flex {
        display: flex;
    }

    .flex.center {
        align-items: center;
    }

    .flex.stretch {
        align-items: stretch;
    }

    .flex.end {
        align-items: flex-end;
    }

    .flex.row {
        flex-flow: row;
    }

    .flex.row-reverse {
        flex-flow: row-reverse;
    }

    .flex.column {
        flex-flow: column;
    }

    .flex.justify {
        justify-content: space-between;
    }

    .flex.jc {
        -ms-justify-content: center;
        justify-content: center;
    }

    .flex.flow {
        flex-flow: wrap;
    }

    .flex.hide {
        display: none;
    }

    table.dataTable tbody tr:nth-child(odd) {
        background-color: #f5f5f5;
    }
    table.dataTable thead th, table.dataTable thead td {
        border-bottom: 1px solid #d3cbcb;
    }
    table.dataTable tbody th, table.dataTable tbody td {
        border-bottom: 1px solid #eee;
    }
    .dataTables_wrapper.no-footer .dataTables_scrollBody {
        border-bottom: 1px solid #fffbfb;
    }
</style>

<!--leez modify-->
<style>
    .layui-form.model-form {
        padding-right: 0 !important;
    }
    .miniHeight .layui-table-cell {
        height: auto !important;
    }
</style>

<div class="layui-body-header">
    <span class="layui-body-header-title">管理</span>
</div>
<form id="projectForm" lay-filter="projectForm" class="layui-form model-form">
    <input id="roleids" value="${roleids}" hidden>
    <input id="pageA" value="${pageA}" hidden>
    <input id="pageInitOnce" value="true" hidden>
    <input id="jdsj_px" value="0" hidden>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <div class="layui-form toolbar">
                            <div class="layui-form-item">
                                <!--                                <label class="layui-form-label" style="color: #00B83F;padding-top: 13px;margin-right:-7px;">创建工程：</label>-->
                                <div class="layui-inline gcs">
                                    <label class="layui-form-label">省份选择</label>
                                    <div class="layui-inline">
                                        <select name="provinceName" lay-filter="provinceName" id="provinceName"
                                                lay-search="provinceName">
                                            <option value="">全部省</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline gcsq">
                                    <label class="layui-form-label">城市选择</label>
                                    <div class="layui-inline">
                                        <select name="cityName" lay-filter="cityName" id="cityName"
                                                lay-search="cityName">
                                            <option value="">全部市</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline gcsq">
                                    <label class="layui-form-label">地区选择</label>
                                    <div class="layui-inline">
                                        <select name="regionName" lay-filter="regionName" id="regionName"
                                                lay-search="regionName">
                                            <option value="">全部区县</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline dname">
                                    <label class="layui-form-label dm">店名</label>
                                    <div class="layui-inline lablew">
                                        <input id="address" name="name" placeholder="格式: xxx店" type="text"
                                               class="layui-input" required autocomplete="off"/>
                                    </div>
                                </div>
                                @if(shiro.hasPermission("/project/addProject")){
                                <div class="layui-inline ">
                                    <label class="layui-form-label">营运经理</label>
                                    <div class="layui-inline">
                                        <select name="yyjl" lay-filter="yyjl" id="yyjl"
                                                lay-search="yyjl">
                                            <option value="">营运经理</option>
                                        </select>
                                    </div>
                                </div>
                                @}
                                <div class="layui-inline" style="text-align: center;">
                                    @if(shiro.hasPermission("/project/addProject")){
                                    <a id="btnAdd" class="layui-btn icon-btn">添加
                                    </a>
                                    @}
                                </div>
                                @if(shiro.hasPermission("/gc/gcxgdm")){
                                <div class="layui-inline syzh">
                                   <label class="layui-form-label">收银账号</label>
                                    <div class="layui-inline">
                                        <select name="cashierAccountYn" lay-filter="cashierAccountYn"
                                                id="cashierAccountYn"
                                                lay-search="cashierAccountYn">
                                            <option value="">收银账号</option>
                                            <option value="Y">收银账号已建</option>
                                            <option value="N">收银账号未建</option>
                                        </select>
                                    </div>
                                </div>
                                @}
                                <div class="layui-inline syzh">
                                   <label class="layui-form-label">是否开业</label>
                                    <div class="layui-inline">
                                        <select name="allStautusEnd" lay-filter="allStautusEnd"
                                                id="allStautusEnd"
                                                lay-search="allStautusEnd">
                                            <option value="N">未开业</option>
                                            <option value="Y">已开业</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline kgtime">
                                   <label class="layui-form-label">开工时间</label>
                                    <div class="layui-inline">
                                        <select name="startWorkYn" lay-filter="endYn" id="startWorkYn"
                                                lay-search="startWorkYn">
                                            <option value="">开工时间</option>
                                            <option value="Y">开工时间已确定</option>
                                            <option value="N">开工时间未确定</option>
                                        </select>
                                    </div>
                                </div>
                                <!--<div class="layui-inline kgtime">
                                    <label class="layui-form-label gc">是否完工</label>
                                    <div class="layui-inline">
                                        <select name="engineering" id="engineering"
                                                lay-search="engineering">
                                            <option value="N">未确定</option>
                                            <option value="Y">已完工</option>
                                        </select>
                                    </div>
                                </div>-->
                                <div class="layui-inline isbd">
                                   <label class="layui-form-label">是否闭店</label>
                                    <div class="layui-inline">
                                        <select name="cashierAccountYn" lay-filter="cashierAccountYn" id="status"
                                                lay-search="cashierAccountYn" onchange="change()">
                                            <option value="1">正常</option>
                                            <option value="0">已闭店</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">节点选择</label>
                                    <div class="layui-inline">
                                        <select name="jiedian" lay-filter="jiedian" id="jiedian">
                                            <option value="">全部</option>
                                            <option value="kfzj">开发总监节点</option>
                                            <option value="gczj">工程总监节点</option>
                                            <option value="yyzj">营运总监节点</option>
                                            <option value="yyjl">指定营运经理节点</option>
                                            <option value="zddd">指定督导节点</option>
                                            <option value="dd">督导节点</option>
                                            <option value="wgsj">完工时间节点</option>
                                            <option value="kysj">开业时间节点</option>
                                        </select>
                                    </div>
                                </div>

                                @if(shiro.hasPermission("/project/gcbcx")){
                                <div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-inline">
                                        <select name="gcbcx" lay-filter="gcbcx" id="gcbcx">
                                            <option value="">全部</option>
                                            <option value="gcdsh" selected>工程待审核</option>
                                        </select>
                                    </div>
                                </div>
                                @}
                                <div class="layui-inline btns">
                                    <input type="button" class="layui-btn layui-btn-sm marrig" value="搜索" id="btnSearch">
                                </div>
                                <div class="layui-inline">
                                    <input type="button" class="layui-btn layui-btn-sm" value="按建店时间排序" id="orderbyJd">
                                </div>
                                @if(shiro.hasPermission("/gczz/stop")){
                                <div class="layui-inline" id="close">
                                    <input type="button" class="layui-btn layui-btn-sm" value="关店" id="btnEdit">
                                </div>
                                <div class="layui-inline" id="open" style="display: none">
                                    <input type="button" class="layui-btn layui-btn-sm" value="开店" id="btnOpen">
                                </div>
                                @}


                            </div>
                        </div>
                        <table class="layui-table" id="projectTable" lay-filter="projectTable">
                            <thead>
                                <tr>
                                    <th class="layui-table-col-special" style="padding: 0; width: 48px"></th>
                                    <th class="layui-table-col-special" style="padding: 0; width: 41px">
                                        <div class="layui-table-cell laytable-cell-2-0-1 laytable-cell-numbers" align="center">
                                            <span>序号</span>
                                        </div>
                                    </th>
                                    <th class="layui-unselect" style="padding: 0; ">
                                        <div class="layui-table-cell laytable-cell-2-0-2" align="left">
                                            <span>门店名称</span>
                                        </div>
                                    </th>
                                    <th class="layui-table-col-special" style="padding: 0; ">
                                        <div class="layui-table-cell laytable-cell-2-0-3" align="left">
                                            <span>待办任务</span>
                                        </div>
                                    </th>
                                    <th class="layui-table-col-special" style="padding: 0; ">
                                        <div class="layui-table-cell laytable-cell-2-0-4" align="left">
                                            <span>
                                                <div class="line-box flex">
                                                    <span class="sTitle">开发<br />区域<br/>经理</span>
                                                    <span class="sTitle">开发<br />总监</span>
                                                    <span class="sTitle">工程<br />总监 </span>
                                                    <span class="sTitle">营运<br />总监</span>
                                                    <span class="sTitle">指定<br />营运<br />经理</span>
                                                    <span class="sTitle">指定<br />督导</span>
                                                    <span class="sTitle">督导</span>
                                                    <span class="sTitle">完工<br />时间</span>
                                                    <span class="sTitle">开业<br />时间</span>
                                                </div>
                                            </span>
                                        </div>
                                    </th>
                                    <th style="padding: 0; ">
                                        <div class="layui-table-cell laytable-cell-2-0-5" align="left">
                                            <span>开发人员</span>
                                        </div>
                                    </th>
                                    <th class="layui-unselect" style="padding: 0; ">
                                        <div class="layui-table-cell laytable-cell-2-0-6" align="left">
                                            <span>添加时间</span>
                                        </div>
                                    </th>
                                </tr>
                            </thead>

                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <input id="ida" hidden>
</form>

<style>
    .dev-user {
        border-bottom: 1px dashed transparent;
    }

    .dev-user i {
        display: none;
    }

    .dev-user:hover {
        border-bottom: 1px dashed #1E9FFF;
        cursor: pointer;
    }
    .dev-user:hover i {
        display: inline-block;
    }
</style>

<script type="text/html" id="developUser">
    <div>
        <span class="dev-user" title="查看{{d.createUserName}}的负责门店" lay-event="viewShopByCreateUser">{{d.createUserName}}</span>
    </div>
</script>

<script type="text/html" id="tableBar">
    <div style="overflow: auto;text-overflow: unset;white-space: normal;">
        <span id="changeDM" lay-event="changeDM">
            @if(shiro.hasPermission("/gc/gcxgdm")){
                <span></span>
            @}
        </span>
        <p>
            <!-- 开工日期 -->
            {{# if(d.kgtime){}}
                {{d.kgtime}}
            {{# } }}

            {{# if(d.status==0){ }}工程已中止{{# } }}
        </p>

        {{# if(d.status != 0){ }}
        <p>
            {{# if(${role_yyzj}){}}
                {{# if(d.yyjlname){ }}
                    营运经理：{{d.yyjlname}}
                    {{# if (d.selectyyjl == 1){ }}
                        <a class="layui-link" lay-event="manager" id="manager">(替换)</a>
                    {{# } }}
                {{# }else{ }}
                    {{# if (d.selectyyjl == 1){ }}
                        <a class="layui-btn layui-btn-xs btn-green" lay-event="manager" id="manager">指定营运经理</a>
                    {{# } }}
                {{# } }}
            {{# } }}

            {{# if(${role_yyjl && role_dd} || ${role_yyjl}){}}
                {{# if (d.ddname){ }}
                    督导：{{d.ddname}}
                    {{# if (d.selectdd == 1){}}
                        <a class="layui-link" lay-event="supervision" id="supervision">(替换)</a>
                    {{# }}}
                {{# }else{ }}
                    {{# if (d.selectdd == 1){}}
                        <a class="layui-btn layui-btn-xs btn-green" lay-event="supervision" id="supervision">指定督导</a>
                    {{# }}}
                {{# } }}
            {{# } }}



        </p>
        {{# } }}
        {{# if(d.status != 0){ }}
            <!-- 开发人员？-->
            {{# if(${role_kfry}){ }}
                {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                    <a class="layui-btn layui-btn-xs
                        {{# if(d.swbtn == 1 && d.swedit==1){ }}
                            btn-green
                        {{# }else if(d.swbtn == 1 && d.swedit == 0 ){ }}
                            btn-red
                        {{# } }}"
                        lay-event="things">商务条件</a>
                {{# }else{ }}
                        <a class="layui-btn layui-btn-xs
                        {{# if(d.swbtn == 1 && d.swedit==1){ }}
                            btn-green
                        {{# }else if(d.swbtn == 1 && d.swedit == 0 ){ }}
                            btn-red
                        {{# } }}"
                        lay-event="swtjTable">商务条件</a>
                {{# } }}
                <a class="layui-btn layui-btn-xs
                    {{# if(d.gcbtn == 1 && d.gcedit == 1){ }}
                        btn-green
                    {{# }else if(d.gcbtn == 1 && d.gcedit==0 ){ }}
                        btn-red
                    {{# } }}"
                    lay-event="projectTerm">工程条件</a>
            <!-- 开发经理？-->
            {{# }else if(${role_kfqyjl} ){ }}
                {{# if (d.swbtn == 0 ){ }}
                    <a lay-event="">商务条件未提交</a>
                {{# }else if (d.swbtn == 1 ){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">商务条件</a>
                {{# } }}

                {{# if (d.gcbtn == -1 ){ }}
                {{# }else if(d.gcbtn==1){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">工程条件</a>
                {{# }else{ }}
                    <a lay-event="">工程条件未提交</a>
                {{# } }}
            <!-- 开发总监？-->
            {{# }else if(${role_kfzj} ){ }}

                {{# if (d.swbtn == 0 ){ }}
                    <a lay-event="">商务条件未提交</a>
                {{# }else if (d.swbtn == 1 ){ }}
                    {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="things">商务条件</a>
                    {{# }else{ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">商务条件</a>
                    {{# } }}
                    {{# if (d.auditbtn == 1 ){ }}
                    {{# } }}
                {{# } }}

                {{# if (d.gcbtn == -1 ){ }}
                {{# }else if(d.gcbtn==1){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">工程条件</a>
                {{# }else{ }}
                    <a lay-event="">工程条件未提交</a>
                {{# } }}

            <!-- 工程总监？-->
            {{# } else if(${role_gczj} ){ }}
                {{# if (d.swbtn == 0 ){ }}
                    <a lay-event="">开发人员未提交</a>
                {{# } else if (d.swbtn == 1 ){ }}
                    {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="things">商务条件</a>
                    {{# }else{ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">商务条件</a>
                    {{# } }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">工程条件</a>
                {{# } else if (d.swbtn == 2 ){ }}
                    商务条件待审核
                {{# } }}

            <!-- 营运总监? -->
            {{# }else if(${role_yyzj} ){}}
                {{# if (d.swbtn == -1 ){}}
                {{# }else if (d.swbtn == 1 ){}}
                    {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                    {{# }else{ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                    {{# } }}
                {{# }else{ }}
                    <a lay-event="">商务条件未提交</a>
                {{# } }}
                {{# if (d.gcbtn == -1 ){ }}
                {{# }else if (d.gcbtn == 1 ){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
                {{# }else{ }}
                    <a lay-event="">工程条件未提交</a>
                {{# }}}

                {{# if (d.auditbtn == 1 && d.status!=0 ){ }}
                    <a class="layui-btn layui-btn-xs  btn-green" lay-event="examine">确认开店</a>
                {{# }}}

<!--                {{# if(d.yyjlname!=""){ }}-->
<!--                    {{d.yyjlname}}-->
<!--                {{# } }}-->

<!--                &lt;!&ndash; 拥有指定营运经理的权限 &ndash;&gt;-->
<!--                {{# if (d.selectyyjl == 1){ }}-->
<!--                    <a class="layui-btn layui-btn-xs btn-green" lay-event="manager" id="manager">指定营运经理</a>-->
<!--                {{# } }}-->
                {{# if (d.kdtask == 1){ }}
                    <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">查看开店任务</a>
                {{# } }}
            {{# } }}

            {{# if(${role_yyjl && role_dd} ){}}  <!--督导+yyjl-->

                {{# if (d.swbtn == 1 ){}}
                    {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                    {{# }else{ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                    {{# } }}
                {{# }else{ }}
                    <a lay-event="">商务条件未提交</a>
                {{# }}}
                {{# if (d.gcbtn == -1 ){ }}
                {{# }else if (d.gcbtn == 1 ){}}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
                {{# }else{ }}
                    <a lay-event="">工程条件未提交</a>
                {{# }}}

<!--                {{# if (d.ddname!=""){}}-->
<!--                    {{d.ddname}}-->
<!--                {{# }}}-->
<!--                {{# if (d.selectdd == 1){}}-->
<!--                    <a class="layui-btn layui-btn-xs btn-green" lay-event="supervision" id="supervision">分派督导</a>-->
<!--                {{# }}}-->

                <!-- {{# if (d.kdtask == 1){}}
                 <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
                 {{# }else { }}
                 开工日期未确定
                 {{# }}}-->
                <!--督导-->
                {{# if (d.kdtask == 1){ }}
                    {{# if(d.kdtaskedit==1){ }}
                        <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">分配开店任务</a>
                    {{# }else{ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
                    {{# } }}
                {{# } }}
            {{# }else{ }}
                {{# if(${role_yyjl} ){ }}

                    {{# if (d.swbtn == 1 ){ }}
                        {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                            <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                        {{# }else{ }}
                            <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                        {{# } }}
                    {{# }else{ }}
                        <a lay-event="">商务条件未提交</a>
                    {{# } }}

                    {{# if (d.gcbtn == -1 ){ }}
                    {{# }else if (d.gcbtn == 1 ){ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
                    {{# }else{ }}
                        <a lay-event="">工程条件未提交</a>
                    {{# } }}


<!--                    {{# if (d.selectdd == 1){ }}-->
<!--                        <a class="layui-link" lay-event="supervision" id="supervision">(更换)</a>-->
<!--                    {{# }}}-->

                    {{# if (d.kdtask == 1){ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
                    {{# } }}
                {{# } }}

                {{# if(${role_dd} ){ }}

                    {{# if (d.swbtn == 1 ){ }}
                        {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                            <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                        {{# }else{ }}
                            <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                        {{# } }}
                    {{# }else{ }}
                        <a lay-event="">商务条件未提交</a>
                    {{# }}}
                    {{# if (d.gcbtn == -1 ){ }}
                    {{# }else if (d.gcbtn == 1 ){ }}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
                    {{# }else{ }}
                        <a lay-event="">工程条件未提交</a>
                    {{# } }}

                    {{# if (d.kdtask == 1){ }}
                        {{# if(d.kdtaskedit==1){ }}
                            <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">分配开店任务</a>
                        {{# }else{ }}
                            <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
                        {{# } }}
                    {{# } }}
                {{# } }}
            {{# } }}

            {{# if (d.gckg == 1){}}
                <a class="layui-btn layui-btn-xs btn-green" lay-event="projectTask">工程流程</a>
            {{# }}}

            <!-- 工程部? -->
        {{# if (${role_gcb} && ${role_yyjl}){ }}

        {{# }
        else if (${role_yyjl}){ }}

        {{# }

        else if (${role_gcb} && ${role_gczj}){ }}

        {{# }

        else if (${role_gcb}){ }}
        <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">工程条件</a>
        {{# }
        else{ }}

        {{# } }}

            {{# if(${role_netshop} ){}}
                <!--{{# if (d.netshopAddr == 0 && d.mealOnline == 0 && d.queueMachine == 0){}}
                    督导尚未建店
                {{# }else {}}
                    {{# if (d.netshopAddr == 1){}}
                    &lt;!&ndash;<a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">完成网上建店</a>&ndash;&gt;
                    {{# }}}
                {{# }}}-->
                {{# if (d.kdtask == 1){}}
                    {{# if(d.kdtaskedit==1){}}
                        <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">分配开店任务</a>
                    {{# }else{}}
                        <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
                    {{# }}}
                {{# }}}

            {{# }}}
        {{# } }}
        @if(shiro.hasPermission("/project/kdrw")){
        <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">查看开店任务</a>
        @}
        {{# if (d.kfzj == '开发总监已驳回'){}}
            {{d.rejectInfo}}
        {{# }}}
        {{# if (d.gczj == '工程总监已驳回'){}}
            {{d.rejectInfo}}
        {{# }}}
        {{# if (d.yyzj == '营运总监已驳回'){}}
            {{d.rejectInfo}}
        {{# }}}
        {{# if (d.kfqyjl == '开发区域经理已驳回'){}}
        {{d.rejectInfo}}
        {{# }}}
    </div>
</script>



<script id="statusTpl" type="text/html">
    <div class="line-box flex">
        <dl>
            {{# if(d.kfqyjl!=""&&d.kfqyjl=="开发区域经理已确认"){ }}
            <dt class="dt1">1</dt>
            {{# } else if(d.kfqyjl!=""&&d.kfqyjl=="开发区域经理已驳回"){ }}
            <dt class="dt1ye">1</dt>
            {{# } else { }}
            <dt>1</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.kfzj!=""&&d.kfzj=="开发总监已确认"){ }}
            <dt class="dt1">2</dt>
            {{# } else if(d.kfzj!=""&&d.kfzj=="开发总监已驳回"){ }}
            <dt class="dt1ye">2</dt>
            {{# } else if(d.gczj!=""&&d.gczj=="工程总监已驳回"){ }}
            <dt class="dt1">2</dt>
            {{# } else { }}
            <dt>2</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.gczj!=""&&d.gczj=="工程总监已确认"){ }}
            <dt class="dt1">3</dt>
            {{# } else if(d.gczj!=""&&d.gczj=="工程总监已驳回"){ }}
            <dt class="dt1ye">3</dt>
            {{# } else { }}
            <dt>3</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.yyzj!=""&&d.yyzj=="营运总监已确认"){ }}
            <dt class="dt1">4</dt>
            {{# } else if(d.yyzj!=""&&d.yyzj=="营运总监已驳回"){ }}
            <dt class="dt1ye">4</dt>
            {{# } else { }}
            <dt>4</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.allotYy!=""&&d.allotYy=="已指定营运经理"){ }}
            <dt class="dt1">5</dt>
            {{# } else { }}
            <dt>5</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.allotDd!=""&&d.allotDd=="已指定督导"){ }}
            <dt class="dt1">6</dt>
            {{# } else { }}
            <dt>6</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.dudao!=""&&d.dudao=="督导任务完成"){ }}
            <dt class="dt1">7</dt>
            {{# } else { }}
            <dt>7</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.gcb!=""&&d.gcb=="工程已完工"){ }}
            <dt class="dt1">8</dt>
            {{# } else { }}
            <dt>8</dt>
            {{# } }}
        </dl>
        <dl>
            {{# if(d.openDate!=""){ }}
            <dt class="dt1">9</dt>
            {{# } else { }}
            <dt>9</dt>
            {{# } }}
        </dl>
    </div>
</script>


<script id="columnMini" type="text/html">
    <div class="column-mini" style="position: relative">
        <div class="" style="position: absolute; top: 2px; right: 4px">
            <input type="checkbox" name="layTableCheckbox" lay-skin="primary" />
        </div>
        <div style="font-size: 14px">
            <strong>{{d.name}}</strong>
        </div>
        <div style="overflow: auto;text-overflow: unset;white-space: normal;">
        <span id="changeDM" lay-event="changeDM">
            @if(shiro.hasPermission("/gc/gcxgdm")){
                <span></span>
            @}
        </span>

            <p>
                <!-- 开工日期 -->
                {{# if(d.kgtime){}}
                {{d.kgtime}}
                {{# } }}

                {{# if(d.status==0){ }}工程已中止{{# } }}
            </p>

            {{# if(d.status != 0){ }}
            <p>
                {{# if(${role_yyzj}){}}
                {{# if(d.yyjlname){ }}
                营运经理：{{d.yyjlname}}
                {{# if (d.selectyyjl == 1){ }}
                <a class="layui-link" lay-event="manager" id="manager">(替换)</a>
                {{# } }}
                {{# }else{ }}
                {{# if (d.selectyyjl == 1){ }}
                <a class="layui-btn layui-btn-xs btn-green" lay-event="manager" id="manager">指定营运经理</a>
                {{# } }}
                {{# } }}
                {{# } }}

                {{# if(${role_yyjl && role_dd} || ${role_yyjl}){}}
                {{# if (d.ddname){ }}
                督导：{{d.ddname}}
                {{# if (d.selectdd == 1){}}
                <a class="layui-link" lay-event="supervision" id="supervision">(替换)</a>
                {{# }}}
                {{# }else{ }}
                {{# if (d.selectdd == 1){}}
                <a class="layui-btn layui-btn-xs btn-green" lay-event="supervision" id="supervision">(替换)</a>
                {{# }}}
                {{# } }}
                {{# } }}



            </p>
            {{# } }}

            {{# if(d.status != 0){ }}
            <!-- 开发人员？-->
            {{# if(${role_kfry}){ }}
            {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
            <a class="layui-btn layui-btn-xs
                    {{# if(d.swbtn == 1 && d.swedit==1){ }}
                        btn-green
                    {{# }else if(d.swbtn == 1 && d.swedit == 0 ){ }}
                        btn-red
                    {{# } }}"
               lay-event="things">商务条件</a>
            {{# }else{ }}
            <a class="layui-btn layui-btn-xs
                    {{# if(d.swbtn == 1 && d.swedit==1){ }}
                        btn-green
                    {{# }else if(d.swbtn == 1 && d.swedit == 0 ){ }}
                        btn-red
                    {{# } }}"
                    lay-event="swtjTable">商务条件</a>
            {{# } }}

            <a class="layui-btn layui-btn-xs
                    {{# if(d.gcbtn == 1 && d.gcedit == 1){ }}
                        btn-green
                    {{# }else if(d.gcbtn == 1 && d.gcedit==0 ){ }}
                        btn-red
                    {{# } }}"
               lay-event="projectTerm">工程条件</a>

            <!-- 开发总监？-->
            {{# }else if(${role_kfzj} ){ }}

            {{# if (d.swbtn == 0 ){ }}
            <a lay-event="">商务条件未提交</a>
            {{# }else if (d.swbtn == 1 ){ }}
                {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="things">商务条件</a>
                {{# }else{ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">商务条件</a>
                {{# } }}
            {{# if (d.auditbtn == 1 ){ }}
            {{# } }}
            {{# } }}

            {{# if (d.gcbtn == -1 ){ }}
            {{# }else if(d.gcbtn==1){ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">工程条件</a>
            {{# }else{ }}
            <a lay-event="">工程条件未提交</a>
            {{# } }}

            <!-- 工程总监？-->
            {{# } else if(${role_gczj} ){ }}
            {{# if (d.swbtn == 0 ){ }}
            <a lay-event="">开发人员未提交</a>
            {{# } else if (d.swbtn == 1 ){ }}
            {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                <a class="layui-btn layui-btn-xs btn-red" lay-event="things">商务条件</a>
            {{# }else{ }}
                <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">商务条件</a>
            {{# } }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">工程条件</a>
            {{# } else if (d.swbtn == 2 ){ }}
            商务条件待审核
            {{# } }}

            <!-- 营运总监? -->
            {{# }else if(${role_yyzj} ){}}
            {{# if (d.swbtn == -1 ){}}
            {{# }else if (d.swbtn == 1 ){}}
                {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                {{# }else{ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                {{# } }}
            {{# }else{ }}
                <a lay-event="">商务条件未提交</a>
            {{# } }}

            {{# if (d.gcbtn == -1 ){ }}
            {{# }else if (d.gcbtn == 1 ){ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
            {{# }else{ }}
            <a lay-event="">工程条件未提交</a>
            {{# }}}

            {{# if (d.auditbtn == 1 && d.status!=0 ){ }}
            <a class="layui-btn layui-btn-xs  btn-green" lay-event="examine">确认开店</a>
            {{# }}}

            <!--                {{# if(d.yyjlname!=""){ }}-->
            <!--                    {{d.yyjlname}}-->
            <!--                {{# } }}-->

            <!--                &lt;!&ndash; 拥有指定营运经理的权限 &ndash;&gt;-->
            <!--                {{# if (d.selectyyjl == 1){ }}-->
            <!--                    <a class="layui-btn layui-btn-xs btn-green" lay-event="manager" id="manager">指定营运经理</a>-->
            <!--                {{# } }}-->
            {{# if (d.kdtask == 1){ }}
            <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">查看开店任务</a>
            {{# } }}
            {{# } }}

            {{# if(${role_yyjl && role_dd} ){}}  <!--督导+yyjl-->

            {{# if (d.swbtn == 1 ){}}
                {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                {{# }else{ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                {{# } }}
            {{# }else{ }}
            <a lay-event="">商务条件未提交</a>
            {{# }}}
            {{# if (d.gcbtn == -1 ){ }}
            {{# }else if (d.gcbtn == 1 ){}}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
            {{# }else{ }}
            <a lay-event="">工程条件未提交</a>
            {{# }}}

            <!--                {{# if (d.ddname!=""){}}-->
            <!--                    {{d.ddname}}-->
            <!--                {{# }}}-->
            <!--                {{# if (d.selectdd == 1){}}-->
            <!--                    <a class="layui-btn layui-btn-xs btn-green" lay-event="supervision" id="supervision">分派督导</a>-->
            <!--                {{# }}}-->

            <!-- {{# if (d.kdtask == 1){}}
             <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
             {{# }else { }}
             开工日期未确定
             {{# }}}-->
            <!--督导-->
            {{# if (d.kdtask == 1){ }}
            {{# if(d.kdtaskedit==1){ }}
            <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">分配开店任务</a>
            {{# }else{ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
            {{# } }}
            {{# } }}
            {{# }else{ }}
            {{# if(${role_yyjl} ){ }}

            {{# if (d.swbtn == 1 ){ }}
                {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                {{# }else{ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                {{# } }}
            {{# }else{ }}
            <a lay-event="">商务条件未提交</a>
            {{# } }}

            {{# if (d.gcbtn == -1 ){ }}
            {{# }else if (d.gcbtn == 1 ){ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
            {{# }else{ }}
            <a lay-event="">工程条件未提交</a>
            {{# } }}


            <!--                    {{# if (d.selectdd == 1){ }}-->
            <!--                        <a class="layui-link" lay-event="supervision" id="supervision">(更换)</a>-->
            <!--                    {{# }}}-->

            {{# if (d.kdtask == 1){ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
            {{# } }}
            {{# } }}

            {{# if(${role_dd} ){ }}

            {{# if (d.swbtn == 1 ){ }}
                {{# if(new Date('2022-7-23').getTime() > new Date(d.createTime).getTime()){ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="things">查看商务条件</a>
                {{# }else{ }}
                    <a class="layui-btn layui-btn-xs btn-red" lay-event="swtjTable">查看商务条件</a>
                {{# } }}
            {{# }else{ }}
            <a lay-event="">商务条件未提交</a>
            {{# }}}

            {{# if (d.gcbtn == -1 ){ }}
            {{# }else if (d.gcbtn == 1 ){ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">查看工程条件</a>
            {{# }else{ }}
            <a lay-event="">工程条件未提交</a>
            {{# } }}

            {{# if (d.kdtask == 1){ }}
            {{# if(d.kdtaskedit==1){ }}
            <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">分配开店任务</a>
            {{# }else{ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
            {{# } }}
            {{# } }}
            {{# } }}
            {{# } }}

            {{# if (d.gckg == 1){}}
            <a class="layui-btn layui-btn-xs btn-green" lay-event="projectTask">工程流程</a>
            {{# }}}

            <!-- 工程部? -->
            {{# if (${role_gcb} && ${role_yyjl}){ }}

            {{# }else if (${role_yyjl}){ }}

            {{# }

            else if (${role_gcb} && ${role_gczj}){ }}

            {{# }

            else if (${role_gcb}){ }}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="projectTerm">工程条件</a>
            {{# }
            else{ }}

            {{# } }}


            {{# if(${role_netshop} ){}}
            <!--{{# if (d.netshopAddr == 0 && d.mealOnline == 0 && d.queueMachine == 0){}}
                督导尚未建店
            {{# }else {}}
                {{# if (d.netshopAddr == 1){}}
                &lt;!&ndash;<a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">完成网上建店</a>&ndash;&gt;
                {{# }}}
            {{# }}}-->
            {{# if (d.kdtask == 1){}}
            {{# if(d.kdtaskedit==1){}}
            <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">分配开店任务</a>
            {{# }else{}}
            <a class="layui-btn layui-btn-xs btn-red" lay-event="steerTask">查看开店任务</a>
            {{# }}}
            {{# }}}

            {{# }}}
            {{# } }}
            @if(shiro.hasPermission("/project/kdrw")){
            <a class="layui-btn layui-btn-xs btn-green" lay-event="steerTask">查看开店任务</a>
            @}
        </div>

        <div class="line-box flex">
            <span class="sTitle" style="color: #666">开发<br/>区域<br/>经理</span>
            <span class="sTitle" style="color: #666">开发<br/>总监</span>
            <span class="sTitle" style="color: #666">工程<br/>总监 </span>
            <span class="sTitle" style="color: #666">营运<br/>总监</span>
            <span class="sTitle" style="color: #666">指定<br/>营运<br/>经理</span>
            <span class="sTitle" style="color: #666">指定<br/>督导</span>
            <span class="sTitle" style="color: #666">督导</span>
            <span class="sTitle" style="color: #666">完工<br/>时间</span>
            <span class="sTitle" style="color: #666">开业<br/>时间</span>
        </div>



        <div class="line-box flex">
            <dl>
                {{# if(d.kfqyjl!=""&&d.kfqyjl=="开发区域经理已确认"){ }}
                <dt class="dt1">1</dt>
                {{# } else if(d.kfqyjl!=""&&d.kfqyjl=="开发区域经理已驳回"){ }}
                <dt class="dt1ye">1</dt>
                {{# } else { }}
                <dt>1</dt>
                {{# } }}
            </dl>

            <dl>
                {{# if(d.kfzj!=""&&d.kfzj=="开发总监已确认"){ }}
                <dt class="dt1">2</dt>
                {{# } else if(d.kfzj!=""&&d.kfzj=="开发总监已驳回"){ }}
                <dt class="dt1ye">2</dt>
                {{# } else if(d.gczj!=""&&d.gczj=="工程总监已驳回"){ }}
                <dt class="dt1">2</dt>
                {{# } else { }}
                <dt>2</dt>
                {{# } }}
            </dl>
            <dl>
                {{# if(d.gczj!=""&&d.gczj=="工程总监已确认"){ }}
                <dt class="dt1">3</dt>
                {{# } else if(d.gczj!=""&&d.gczj=="工程总监已驳回"){ }}
                <dt class="dt1ye">3</dt>
                {{# } else { }}
                <dt>3</dt>
                {{# } }}
            </dl>
            <dl>
                {{# if(d.yyzj!=""&&d.yyzj=="营运总监已确认"){ }}
                <dt class="dt1">4</dt>
                {{# } else if(d.yyzj!=""&&d.yyzj=="营运总监已驳回"){ }}
                <dt class="dt1ye">4</dt>
                {{# } else { }}
                <dt>4</dt>
                {{# } }}
            </dl>
            <dl>
                {{# if(d.allotYy!=""&&d.allotYy=="已指定营运经理"){ }}
                <dt class="dt1">5</dt>
                {{# } else { }}
                <dt>5</dt>
                {{# } }}
            </dl>
            <dl>
                {{# if(d.allotDd!=""&&d.allotDd=="已指定督导"){ }}
                <dt class="dt1">6</dt>
                {{# } else { }}
                <dt>6</dt>
                {{# } }}
            </dl>
            <dl>
                {{# if(d.dudao!=""&&d.dudao=="督导任务完成"){ }}
                <dt class="dt1">7</dt>
                {{# } else { }}
                <dt>7</dt>
                {{# } }}
            </dl>
            <dl>
                {{# if(d.gcb!=""&&d.gcb=="工程已完工"){ }}
                <dt class="dt1">8</dt>
                {{# } else { }}
                <dt>8</dt>
                {{# } }}
            </dl>
            <dl>
                {{# if(d.openDate!=""){ }}
                <dt class="dt1">9</dt>
                {{# } else { }}
                <dt>9</dt>
                {{# } }}
            </dl>
        </div>

        <div style="height: 10px"></div>

        {{# if(d.yusuanHeji){ }}
        <div style="" >
            预算合计：<a class="layui-table-link" style="text-decoration:underline;" href="javascript:open_yusuan('{{ d.yaoma }}','{{ d.name }}','1');">{{ d.yusuanHeji }}</a>元
        </div>
        {{# } }}

        <div style="">
            <span style="color: #666">接铺时间：</span>{{d.jptime}}
        </div>

        <div style="">
            <span style="color: #666">开发人员：</span>{{d.createUserName}}
        </div>
        <div>
            <span style="color: #666">添加时间: </span>{{d.createTime}}
        </div>
        {{# if(d.rejectInfo){ }}
        <div>
            <span style="color: #666">驳回原因: </span>{{d.rejectInfo}}
        </div>
        {{# } }}
    </div>
</script>
<script type="text/html" id="yusuanHejiTpl">
    <a class="layui-table-link" style="text-decoration:underline;" href="javascript:open_yusuan('{{ d.yaoma }}','{{ d.name }}','2');">{{ d.yusuanHeji }}</a>
</script>
<!--<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>-->
<!--<script>-->
<!--    $(document.body).width()-->
<!--    alert($(document.body).width())-->
<!--</script>-->
@}
